/**
 * 
 */
package com.hson.demo.web.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

import com.hson.demo.base.util.TimerPropertyPlaceholderConfigurer;


/**
 * 加载配置文件
 * 
 * @author Hungel.zou
 * @time 2016年2月24日 上午11:31:53
 */
@Configuration
public class DemoWebConfig {

	@Bean(name = { "propertyConfigurer" })
	public TimerPropertyPlaceholderConfigurer getPropertyConfigurer() {
		TimerPropertyPlaceholderConfigurer propertyConfigurer = new TimerPropertyPlaceholderConfigurer();
		Resource[] resources = new Resource[] { new ClassPathResource("common.properties") };
		propertyConfigurer.setLocations(resources);
		propertyConfigurer.setFileEncoding("UTF-8");
		return propertyConfigurer;
	}
}
